package com.haixiaoke.saas.apartment.service.impl;

import java.util.List;

import com.haixiaoke.saas.apartment.domain.HousingPrice;
import com.haixiaoke.saas.apartment.mapper.HousingPriceMapper;
import com.haixiaoke.saas.apartment.service.IHousingPriceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 房屋配置的房费Service业务层处理
 * 
 * @author panda
 * @date 2024-04-07
 */
@Service
public class HousingPriceServiceImpl implements IHousingPriceService {
    @Autowired
    private HousingPriceMapper housingPriceMapper;

    /**
     * 查询房屋配置的房费
     * 
     * @param allocationId 房屋配置的房费主键
     * @return 房屋配置的房费
     */
    @Override
    public List<HousingPrice> selectHousingPriceByAllocationId(Long allocationId) {
        return housingPriceMapper.selectHousingPriceByAllocationId(allocationId);
    }

    /**
     * 查询房屋配置的房费列表
     * 
     * @param housingPrice 房屋配置的房费
     * @return 房屋配置的房费
     */
    @Override
    public List<HousingPrice> selectHousingPriceList(HousingPrice housingPrice) {
        return housingPriceMapper.selectHousingPriceList(housingPrice);
    }

    /**
     * 新增房屋配置的房费
     * 
     * @param housingPrice 房屋配置的房费
     * @return 结果
     */
    @Override
    public int insertHousingPrice(HousingPrice housingPrice) {
        return housingPriceMapper.insertHousingPrice(housingPrice);
    }

    /**
     * 修改房屋配置的房费
     * 
     * @param housingPrice 房屋配置的房费
     * @return 结果
     */
    @Override
    public int updateHousingPrice(HousingPrice housingPrice) {
        return housingPriceMapper.updateHousingPrice(housingPrice);
    }

    /**
     * 批量删除房屋配置的房费
     * 
     * @param allocationIds 需要删除的房屋配置的房费主键
     * @return 结果
     */
    @Override
    public int deleteHousingPriceByAllocationIds(Long[] allocationIds) {
        return housingPriceMapper.deleteHousingPriceByAllocationIds(allocationIds);
    }

    /**
     * 删除房屋配置的房费信息
     * 
     * @param allocationId 房屋配置的房费主键
     * @return 结果
     */
    @Override
    public int deleteHousingPriceByAllocationId(Long allocationId) {
        return housingPriceMapper.deleteHousingPriceByAllocationId(allocationId);
    }

    @Override
    public int insertBatchHousingPrice(List<HousingPrice> housingPriceList) {
        return housingPriceMapper.insertBatchHousingPrice(housingPriceList);
    }

    @Override
    public int updateBatchHousingPrice(List<HousingPrice> housingPriceList) {
        return housingPriceMapper.updateBatchHousingPrice(housingPriceList);
    }

    @Override
    public List<HousingPrice> selectHousingPriceByAllocationIds(List<Long> allocationIds) {
        return housingPriceMapper.selectHousingPriceByAllocationIds(allocationIds);
    }

    @Override
    public List<HousingPrice> selectHousingPriceByHouseId(String houseId) {
        return housingPriceMapper.selectHousingPriceByHouseId(houseId);
    }
}
